package com.cxc.Command;

public interface Command {

    /**
     * 返回一个为null的方法
     * 在实际项目中，可以根据需求设计多个不同的方法
     */
    void execute();

}

class ConcreateCommand implements Command{

    private Receiver receiver;
    public ConcreateCommand(Receiver receiver) {
        this.receiver = receiver;
    }
    @Override
    public void execute() {
        receiver.action();
    }
}
